
import Vue from 'vue'
import Router from 'vue-router'

import {routes} from './router-child'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/view/home/home'),
      children:[...routes]
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('@/view/login/login'),
      children: [],
    },
    {
      path: '/home',
      name: 'Home',
      component: () => import('@/view/home/home'),
      children: [],
    },
    {
      redirect: '/404',
      path: '*',
      component: () => import('@/view/404/404'),
    },
  ]
})
//   {
//     path: '/',
//     name: 'Home',
//     redirect: '/about',
//     component: () => import('@/view/home/home'),
//     children: [],
//   },
//   {
//     path: '/login',
//     name: 'login',
//     component: () => import('@/view/login/login'),
//   },

//]

